//
//  MyTableViewCell.m
//  Beauty
//
//  Created by Snow on 16/8/26.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "MyTableViewCell.h"
#import "GXMacro.h"
@implementation MyTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _buttonOfIlike = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfIlike];
        _buttonOfStore = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfStore];
        _buttonOfMyGood = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfMyGood];
        _buttonOfWishes = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfWishes];
        _buttonOfGiftBox = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfGiftBox];
        _buttonOfMyMoney = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_buttonOfMyMoney];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [_buttonOfMyGood mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView.mas_left);
        make.top.mas_equalTo(self.contentView.mas_top);
        make.width.mas_equalTo(self.contentView.mas_width).multipliedBy(0.333);
        make.height.mas_equalTo(self.contentView.mas_height).multipliedBy(0.5);
    }];
    [_buttonOfStore mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_buttonOfMyGood.mas_right);
        make.top.mas_equalTo(self.contentView.mas_top);
        make.width.mas_equalTo(_buttonOfMyGood.mas_width);
        make.height.mas_equalTo(_buttonOfMyGood.mas_height);
    }];
    [_buttonOfWishes mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_buttonOfStore.mas_right);
        make.top.mas_equalTo(_buttonOfStore.mas_top);
        make.height.mas_equalTo(_buttonOfStore.mas_height);
        make.width.mas_equalTo(_buttonOfStore.mas_width);
    }];
    [_buttonOfIlike mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView.mas_left);
        make.top.mas_equalTo(_buttonOfStore.mas_bottom);
        make.width.mas_equalTo(_buttonOfStore.mas_width);
        make.height.mas_equalTo(_buttonOfStore.mas_height);
    }];
    [_buttonOfGiftBox mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_buttonOfIlike.mas_right);
        make.top.mas_equalTo(_buttonOfIlike.mas_top);
        make.width.mas_equalTo(_buttonOfIlike.mas_width);
        make.height.mas_equalTo(_buttonOfIlike.mas_height);
    }];
    [_buttonOfMyMoney mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_buttonOfGiftBox.mas_right);
        make.top.mas_equalTo(_buttonOfWishes.mas_bottom);
        make.width.mas_equalTo(_buttonOfGiftBox.mas_width);
        make.height.mas_equalTo(_buttonOfGiftBox.mas_height);
    }];
}
@end
